<%-- 
    Document   : helloView
    Created on : Oct 14, 2013, 3:17:20 PM
    Author     : cyhiew
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Hello</title>
    </head>
    <body>

        <p><fmt:message key="greeting"/> <c:out value="${message}"/></p>

        <form:form action="" method="post" commandName="customer">
            <c:if  test="${!empty customerList}">
                <table class="data">
                    <tr>
                        <!-- <th>Product_Catalog_Id</th> -->
                        <!-- <th>Requirement_Type_Id</th> -->
                        <th>Max Price</th>
                        <th>Min_Price</th>
                        <th>&nbsp;</th>
                    </tr>
                    <c:forEach items="${customerList}" var="customer">
                        <tr>

                            <%-- <td>${product.productCatalogId}</td> --%>
                            <%-- <td>${product.requirementTypeId}</td> --%>
                            <td>${customer.name}</td>
                            <td>${customer.addressline1}</td>
                            <td><a href="customer.htm/${customer.customerId}">delete</a></td>
                        </tr>
                    </c:forEach>
                </table>
            </c:if>

            Name:        
            <form:input path="customerId"></form:input>
            <form:errors path="customerId"></form:errors>

                <input type="submit" value="OK">
        </form:form>


    </body>
</html>
